package com.flying.invest.strategy.model;

import com.flying.common.util.Codes;
import com.flying.framework.annotation.ConstantEnum;
import com.flying.framework.annotation.Param;
import com.flying.framework.data.Data;
import com.flying.framework.data.DataSerializable;
import com.flying.framework.metadata.Meta;

@SuppressWarnings("serial")
@Meta(id="i_strategy_type",title="", table="i_strategy_type", primaryKeys={"type_id"})
public class StrategyType extends Data implements DataSerializable {
	public final static String ENTITY_NAME = "i_strategy_type";
	
	public final static String TYPE_ID = "type_id";
	public final static String NAME = "name";
	public final static String CODE = "code";
	public final static String ICON = "icon";
	public final static String REMARKS = "remarks";
	public final static String SENSITIVE = "sensitive";
	public final static String SERVICE = "service";
	public final static String TERM_TYPE = "term_type";
	
	public enum SensitiveType implements ConstantEnum<Integer> {
		None(0, "无"), AMOUNT(1, "市值敏感"), PRICE(2, "价格敏感"), BOTH(3, "市值&价格敏感");

		public final int value;
		public final String remarks;

		SensitiveType(int value, String remarks) {
			this.value = value;
			this.remarks = remarks;
		}
		
		@Override
		public Integer value() {
			return this.value;
		}

		@Override
		public String text() {
			return remarks;
		}
	}
	
	@Param(value=TYPE_ID,   required=true,   maxlength=0,	desc="ID" , generator=Codes.AUTO_INCREMENT)
	private Long typeId;
	
	@Param(value=NAME,   required=true,   maxlength=50,	desc="名称" )
	private String name;
	
	@Param(value=CODE,   required=false,   maxlength=50,	desc="代码" )
	private String code;
	
	@Param(value=ICON,   required=false,   maxlength=50,	desc="图标" )
	private String icon;
	
	@Param(value=REMARKS,   required=false,   maxlength=400,	desc="说明" )
	private String remarks;
	
	@Param(value=SERVICE,   required=false,   maxlength=50,	desc="服务" )
	private String service;
	
	@Param(value=SENSITIVE,   required=false,   maxlength=50,	desc="敏感类型" )
	private Integer sensitive;
	
	@Param(value=TERM_TYPE,   required=false,   maxlength=0,	desc="投资周期" )
	private Integer termType;
	
	
	public Long getTypeId() {
		return this.typeId;
	}
	
	public void setTypeId(Long typeId) {
		this.typeId = typeId;
	}
	
	public String getName() {
		return this.name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getRemarks() {
		return this.remarks;
	}
	
	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}
	
	public String getService() {
		return this.service;
	}
	
	public void setService(String service) {
		this.service = service;
	}

	public Integer getSensitive() {
		return sensitive;
	}

	public void setSensitive(Integer sensitive) {
		this.sensitive = sensitive;
	}

	public Integer getTermType() {
		return termType;
	}

	public void setTermType(Integer termType) {
		this.termType = termType;
	}
	

}